#ifndef CPU_READY_H
#define CPU_READY_H
#include "CPU_SendPort.h"
#include "types.h"

void CPU_Ready(struct Agent_Var* agent)
{
    pdir_t dir = READ_CODE(agent,pdir_t);
    pos_t op_start = agent->pc;
    CPU_CheckPort(agent,dir);
    if(agent->condition == CM_READY)
    {
        agent->pc = op_start;
        CPU_SendPort(agent,dir);
    }
}

#endif
